package org.lc.stk.web.dto.major;

import org.lc.stk.model.baseInfo.Major;

import io.swagger.v3.oas.annotations.media.Schema;

@Schema(description = "专业响应DTO")
public class MajorResponse {
    
    @Schema(description = "专业ID")
    private Integer id;

    @Schema(description = "专业名称")
    private String name;

    @Schema(description = "专业编码")
    private String code;

    @Schema(description = "是否启用")
    private Boolean enabled;

    @Schema(description = "排序号")
    private Integer orderNum;

    @Schema(description = "备注")
    private String remark;

    public static MajorResponse fromEntity(Major major) {
        MajorResponse response = new MajorResponse();
        response.setId(major.getId());
        response.setName(major.getName());
        response.setCode(major.getCode());
        response.setEnabled(major.isEnabled());
        response.setOrderNum(major.getOrderNum());
        response.setRemark(major.getRemark());
        return response;
    }

    // Getters and Setters
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}